// 切换主题色
import { light, dark } from '@/config/themeColor'

export function changeThemeColor(theme) {
  const root = document.querySelector(':root')
  if (theme === 'light') {
    const lightKey = Object.keys(light)
    lightKey.forEach(key => {
      root.style.setProperty(key, light[key])
    })
  }
  if (theme === 'dark') {
    for (const key in dark) {
      root.style.setProperty(key, dark[key])
    }
  }
}

